home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / telecomm / bbs / tbbs093.lha / Rexx / BBSLogOnExtra.rexx < prev    next >
OS/2 REXX Batch file  |  1994-02-15  |  2KB  |  63 lines

  1. /* Extra stuff for logon */
  2.  
  3. CR = D2C(13)
  4. LF = D2C(10)
  5. CRLF = CR||LF
  6. ESC = D2C(27)
  7. ln = arg(1)
  8. LineName = Con_LineActive(ln)
  9. if LineName = "" then exit 10
  10. address value LineName
  11. SetStatus "News"
  12. SendModem CRLF||"Checking for news.."
  13. LastNews = GetUserMisc(ln, "LASTNSCAN")
  14. if open('news', 'BBS:Text/News.txt', 'R') = 1 then do
  15.     qflag = 0
  16.     do while ~qflag
  17.         if readln('news') < LastNews then qflag = 1
  18.         if eof('news') then qflag = 1
  19.         if ~qflag then do
  20.             newsln = readln('news')
  21.             if length(newsln) > 0 then do
  22.                 if open('tmpnews', "T:tmp.news"||ln, 'W') then do
  23.                     do cpyln = 1 to newsln
  24.                         call writeln 'tmpnews', readln('news')
  25.                         end
  26.                     call close 'tmpnews'
  27.                     SendModem CRLF||CRLF
  28.                     SendASCII "t:tmp.news"||ln
  29.                     SendModem CRLF
  30.                     call GetHotkey ln, "Press any key to continue..."
  31.                     address command
  32.                     "delete t:tmp.news"||ln
  33.                     address VALUE LineName
  34.                     end
  35.                 end
  36.             end
  37.         end
  38.     call close 'news'
  39.     call SetUserMisc ln, "LASTNSCAN", GetDateVal(ln)
  40.     end
  41. SendModem CRLF||CRLF
  42. if GetUserMisc(ln, "MSGCHECK") = 1 then do
  43.     SetStatus "Message check"
  44.     SendModem CRLF||"Checking your mail.."||CRLF||CRLF
  45.     if MessageCheck(ln) then do
  46.         SendModem CRLF
  47.         if GetYesNo(ln, "Read these messages now? ", 1, 1) then do
  48.             oldarea = GetMsgArea(ln)
  49.             ReadMarked
  50.             ChgMsgArea oldarea
  51.             end
  52.         end
  53.     else SendModem "No new mail found.."||CRLF||CRLF
  54.     end
  55. if GetUserMisc(ln, "FILECHECK") = 1 then do
  56.     SetStatus "File check"
  57.     SendModem CRLF||"Checking for new files.."||CRLF||CRLF
  58.     ListFiles "-SO -A -N -B -D"||GetUserMisc(ln, "LASTFSCAN")
  59.     call SetUserMisc ln, "LASTFSCAN", GetDateVal(ln)
  60.     end
  61. SendModem CRLF
  62. exit 0
  63.